package reflect;

import java.util.Arrays;

/**
 * 变长参数
 */
public class ArgsDemo {
    public static void main(String[] args) {
        doSome(1);
        doSome(1,2);
        doSome(1,2,3);
    }

    public static void doSome(int... a){
        System.out.println(a.length);
        System.out.println(Arrays.toString(a));
    }

}
